package cz.data.domain.metadata.service;

import cz.data.common.mybatis.BaseService;
import cz.data.domain.metadata.model.dto.MetadataAuthorizeDto;
import cz.data.domain.metadata.model.entity.MetadataAuthorizeEntity;

import java.util.Collection;
import java.util.List;
import java.util.Set;
import java.util.function.Predicate;

public interface MetadataAuthorizeService extends BaseService<MetadataAuthorizeEntity> {

    List<String> getAuthorizedMetadata(String id);

    void metadataAuthorize(MetadataAuthorizeDto metadataAuthorizeDto);

    void refreshCache();

    List<MetadataAuthorizeEntity> getMetadataAuthorizeByRoleId(String role);

    Set<String> authorities(Collection<String> roleIds, Predicate<String> typeFilter);
}
